SOURCE = $(wildcard *.c)
OBJS = $(patsubst %.c,%.o,$(SOURCE))
CC = gcc
CFLAGS = -Wall

main: $(OBJS)
	$(CC) $(CFLAGS) -o main $(OBJS)

depends : $(SOURCE)
	gcc -M $(SOURCE) > depends 
-include depends

.PHONY : clean
clean :
	-rm *.o *.exe

